﻿
@{
    Layout = null;
    var msg = ViewBag.ceshi as T2_5_28_Demo.Models.Students;
    var msgData = ViewData["ceshi"] as T2_5_28_Demo.Models.Students;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div>
        <div>
            <p style="color: rebeccapurple">这是ViewBag</p>
            <h1>@msg.Name</h1>
        </div>
        <div>
            @{
                //好吧
            }
            <p style="color: red">这是ViewData</p>
            <h1>@msgData.Age</h1>
        </div>
        <a href="/Index/Demo">测试连接</a>
    </div>
</body>
</html>
